package com.ciaojian.worker.model.param;

import com.ciaojian.core.enums.business.LeaveDetailType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author Atlakyn
 */
@Data
public class    LeaveApplyParam {
    @ApiModelProperty("提交发型师Id")
    @NotNull(message = "申请人ID不能为空")
    private Integer workerId;

    @ApiModelProperty("提交发型师名称")
    @NotBlank(message = "申请人名称不能为空")
    private String workerName;

    @ApiModelProperty("所属门店ID")
    @NotNull(message = "所属门店ID不能为空")
    private Integer storeId;

    @ApiModelProperty("所属门店名称")
    @NotBlank(message = "所属门店名称不能为空")
    private String storeName;

    @ApiModelProperty("开始时间")
    @NotNull(message = "请选择开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;

    @ApiModelProperty("开始时间段 0早 1晚")
//    @NotNull(message = "请选择早班或晚班")
    private Integer beginRange;

    @ApiModelProperty("结束时间")
    @NotNull(message = "请选择结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @ApiModelProperty("结束时间段 0早 1晚")
//    @NotNull(message = "请选择早班或晚班")
    private Integer endRange;

    @ApiModelProperty("请假事由")
    @NotBlank(message = "请填写请假事由")
    private String reason;

    @ApiModelProperty("请假类型")
    @NotNull(message = "请选择请假类型")
    private LeaveDetailType type;

    @ApiModelProperty("照片列表")
    private String img;

    @ApiModelProperty("是否请半天 0上半天 1下半天")
    private Integer half;
}
